* Create suspension by date --> can only run after R code has created day-by-day data

use "$temp_dir\susp_by_date_2011.dta", clear
append using "$temp_dir\susp_by_date_2012.dta"

keep if ivamath !=. | ivaread !=.
keep if experience != 0
gen middle = (grade == "6" | grade == "7" | grade == "8")

gen exp_capped = experience
replace exp_capped = 15 if experience >= 15
gen exp0 = exp_capped == 0
drop is_bizday

gen day = day(dates)
gen t = day

forvalues year=2011/2012 {
    quietly sum day if month == 2 & year == `year'
	replace t = day + r(max) if month == 3 & year == `year'
}


gen log_susp = log(1+susp)
gen hyp_susp = asinh(susp)




save "$input_dir\susp_by_date.dta", replace
